#coding:utf-8

def get_object_or_none(klass, **kwargs):
    obj = None
    try:
        obj = klass.objects.get(**kwargs)
    except klass.DoesNotExist:
        obj = None
    return obj
